package com.sh.exceptions;

import com.sh.common.enums.BizCodeEnum;
import lombok.Data;

@Data
public class BizException extends Exception {

    private Integer code;

    public BizException(String message) {
        super(message);
    }

    public BizException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public BizException(BizCodeEnum bizCodeEnum) {
        super(bizCodeEnum.getMessage());
        this.code = bizCodeEnum.getCode();
    }

}
